package com.agung.wonogirimaps;

import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.app.Activity;
import android.content.Intent;

public class AboutActivity extends Activity implements OnClickListener
{
	private Button	btnFeedback;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);

		btnFeedback = (Button) findViewById(R.id.btn_feedback);

		btnFeedback.setOnClickListener(this);

	}

	@Override
	public void onBackPressed()
	{
		super.onBackPressed();
		startActivity(new Intent(this, MainActivity.class));
		finish();
	}

	@Override
	public void onClick(View v)
	{
		if (v == btnFeedback)
		{
			Intent emailIntent = new Intent(Intent.ACTION_SENDTO,
					Uri.fromParts("mailto", "agungtryprasetyo@gmail.com", null));
			emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Feedback WonogiriMaps");
			startActivity(Intent.createChooser(emailIntent, "Send email..."));

		}

	}
}
